3.5 \(\int x (a+b \sec (c+d x^2)) \, dx\)

Optimal. Leaf size=26 \[ \frac {a x^2}{2}+\frac {b \tanh ^{-1}\left (\sin \left (c+d x^2\right )\right )}{2 d} \]

[Out]

1/2*a*x^2+1/2*b*arctanh(sin(d*x^2+c))/d

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 26, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {14, 4204, 3770} \[ \frac {a x^2}{2}+\frac {b \tanh ^{-1}\left (\sin \left (c+d x^2\right )\right )}{2 d} \]

Antiderivative was successfully verified.

[In]

Int[x*(a + b*Sec[c + d*x^2]),x]

[Out]

(a*x^2)/2 + (b*ArcTanh[Sin[c + d*x^2]])/(2*d)

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rule 4204

Int[(x_)^(m_.)*((a_.) + (b_.)*Sec[(c_.) + (d_.)*(x_)^(n_)])^(p_.), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplif
y[(m + 1)/n] - 1)*(a + b*Sec[c + d*x])^p, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p}, x] && IGtQ[Simplify[
(m + 1)/n], 0] && IntegerQ[p]

Rubi steps

\begin {align*} \int x \left (a+b \sec \left (c+d x^2\right )\right ) \, dx &=\int \left (a x+b x \sec \left (c+d x^2\right )\right ) \, dx\\ &=\frac {a x^2}{2}+b \int x \sec \left (c+d x^2\right ) \, dx\\ &=\frac {a x^2}{2}+\frac {1}{2} b \operatorname {Subst}\left (\int \sec (c+d x) \, dx,x,x^2\right )\\ &=\frac {a x^2}{2}+\frac {b \tanh ^{-1}\left (\sin \left (c+d x^2\right )\right )}{2 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 26, normalized size = 1.00 \[ \frac {a x^2}{2}+\frac {b \tanh ^{-1}\left (\sin \left (c+d x^2\right )\right )}{2 d} \]

Antiderivative was successfully verified.

[In]

Integrate[x*(a + b*Sec[c + d*x^2]),x]

[Out]

(a*x^2)/2 + (b*ArcTanh[Sin[c + d*x^2]])/(2*d)

________________________________________________________________________________________

fricas [A]  time = 0.75, size = 42, normalized size = 1.62 \[ \frac {2 \, a d x^{2} + b \log \left (\sin \left (d x^{2} + c\right ) + 1\right ) - b \log \left (-\sin \left (d x^{2} + c\right ) + 1\right )}{4 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*sec(d*x^2+c)),x, algorithm="fricas")

[Out]

1/4*(2*a*d*x^2 + b*log(sin(d*x^2 + c) + 1) - b*log(-sin(d*x^2 + c) + 1))/d

________________________________________________________________________________________

giac [B]  time = 0.55, size = 50, normalized size = 1.92 \[ \frac {{\left (d x^{2} + c\right )} a + b \log \left ({\left | \tan \left (\frac {1}{2} \, d x^{2} + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - b \log \left ({\left | \tan \left (\frac {1}{2} \, d x^{2} + \frac {1}{2} \, c\right ) - 1 \right |}\right )}{2 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*sec(d*x^2+c)),x, algorithm="giac")

[Out]

1/2*((d*x^2 + c)*a + b*log(abs(tan(1/2*d*x^2 + 1/2*c) + 1)) - b*log(abs(tan(1/2*d*x^2 + 1/2*c) - 1)))/d

________________________________________________________________________________________

maple [A]  time = 0.20, size = 39, normalized size = 1.50 \[ \frac {a \,x^{2}}{2}+\frac {b \ln \left (\sec \left (d \,x^{2}+c \right )+\tan \left (d \,x^{2}+c \right )\right )}{2 d}+\frac {c a}{2 d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*(a+b*sec(d*x^2+c)),x)

[Out]

1/2*a*x^2+1/2/d*b*ln(sec(d*x^2+c)+tan(d*x^2+c))+1/2/d*c*a

________________________________________________________________________________________

maxima [A]  time = 0.31, size = 31, normalized size = 1.19 \[ \frac {1}{2} \, a x^{2} + \frac {b \log \left (\sec \left (d x^{2} + c\right ) + \tan \left (d x^{2} + c\right )\right )}{2 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*sec(d*x^2+c)),x, algorithm="maxima")

[Out]

1/2*a*x^2 + 1/2*b*log(sec(d*x^2 + c) + tan(d*x^2 + c))/d

________________________________________________________________________________________

mupad [B]  time = 0.58, size = 67, normalized size = 2.58 \[ \frac {a\,x^2}{2}+\frac {b\,\ln \left (-b\,x\,2{}\mathrm {i}-2\,b\,x\,{\mathrm {e}}^{d\,x^2\,1{}\mathrm {i}}\,{\mathrm {e}}^{c\,1{}\mathrm {i}}\right )}{2\,d}-\frac {b\,\ln \left (b\,x\,2{}\mathrm {i}-2\,b\,x\,{\mathrm {e}}^{d\,x^2\,1{}\mathrm {i}}\,{\mathrm {e}}^{c\,1{}\mathrm {i}}\right )}{2\,d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*(a + b/cos(c + d*x^2)),x)

[Out]

(a*x^2)/2 + (b*log(- b*x*2i - 2*b*x*exp(d*x^2*1i)*exp(c*1i)))/(2*d) - (b*log(b*x*2i - 2*b*x*exp(d*x^2*1i)*exp(
c*1i)))/(2*d)

________________________________________________________________________________________

sympy [A]  time = 2.87, size = 42, normalized size = 1.62 \[ \begin {cases} \frac {a \left (c + d x^{2}\right ) + b \log {\left (\tan {\left (c + d x^{2} \right )} + \sec {\left (c + d x^{2} \right )} \right )}}{2 d} & \text {for}\: d \neq 0 \\\frac {x^{2} \left (a + b \sec {\relax (c )}\right )}{2} & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*sec(d*x**2+c)),x)

[Out]

Piecewise(((a*(c + d*x**2) + b*log(tan(c + d*x**2) + sec(c + d*x**2)))/(2*d), Ne(d, 0)), (x**2*(a + b*sec(c))/
2, True))

________________________________________________________________________________________